<!--
*Author：DGZ
 *Contact：jiduxiong@dagongzao.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/wmsproject/warehouse/Wms_Position.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :details="details"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/wmsproject/warehouse/Wms_Position.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        name:'Wms_Position',
        setup() {
            const table = ref({
                key: "PositionId",
                footer: "Foots",
                cnName: "存放点管理", 
                name: "warehouse/Wms_Position",
                newTabEdit: false,
                url: "/Wms_Position/",
                sortName: "PositionId"
            });
            const editFormFields = ref({"PositionCode":"","Enabled":"","IsStockInPort":"","IsStockOutPort":"","StockInTunnel":"","StockOutTunnel":"","StockId":""});
            const editFormOptions = ref([[{"title":"定位点编码","required":true,"field":"PositionCode"}],
                              [{"dataKey":"enabled","data":[],"title":"是否启用","field":"Enabled","type":"switch"},
                               {"dataKey":"enabled","data":[],"title":"是否入库口","required":true,"field":"IsStockInPort","type":"switch"}],
                              [{"dataKey":"enabled","data":[],"title":"是否出库口","required":true,"field":"IsStockOutPort","type":"switch"},
                               {"title":"入库可达巷道;以逗号分割","field":"StockInTunnel"}],
                              [{"title":"出库可达巷道;以逗号分割","field":"StockOutTunnel"},
                               {"dataKey":"WMS_Stock","data":[],"title":"关联库位","field":"StockId","type":"select"}]]);
            const searchFormFields = ref({});
            const searchFormOptions = ref([]);
            const columns = ref([{field:"PositionId",title:"ID",type:"bigint",width:110,hidden:true,readonly:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"WarehouseId",title:"仓库ID",type:"bigint",bind:{ key:"WMS_Warehouse",data:[]},width:110,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"PositionCode",title:"定位点编码",type:"string",link:true,width:120,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"Enabled",title:"是否启用",type:"int",bind:{ key:"enabled",data:[]},width:110,showOverflowTooltip:true,align:"left"},
                       {field:"IsStockInPort",title:"是否入库口",type:"sbyte",bind:{ key:"enabled",data:[]},width:110,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"IsStockOutPort",title:"是否出库口",type:"sbyte",bind:{ key:"enabled",data:[]},width:110,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"StockInTunnel",title:"入库可达巷道;以逗号分割",type:"string",width:150,showOverflowTooltip:true,align:"left"},
                       {field:"StockOutTunnel",title:"出库可达巷道;以逗号分割",type:"string",width:150,showOverflowTooltip:true,align:"left"},
                       {field:"StockId",title:"关联库位",type:"bigint",bind:{ key:"WMS_Stock",data:[]},width:110,showOverflowTooltip:true,align:"left"},
                       {field:"Remarks",title:"备注",type:"string",width:150,showOverflowTooltip:true,align:"left"},
                       {field:"IsValid",title:"是否有效",type:"int",width:110,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"CreateId",title:"创建用户",type:"bigint",width:80,hidden:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"Creator",title:"创建人",type:"string",width:100,showOverflowTooltip:true,align:"left"},
                       {field:"CreateTime",title:"创建时间",type:"datetime",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyId",title:"修改用户",type:"bigint",width:80,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Modifier",title:"修改人",type:"string",width:100,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyTime",title:"修改时间",type:"datetime",width:110,showOverflowTooltip:true,align:"left"}]);
            const detail = ref({columns:[]});
            const details = ref([]);
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
                details
            };
        },
    });
</script>
